home *** CD-ROM | disk | FTP | other *** search
/ Giga Games 1 / Giga Games.iso / net / hack / 3_1_3 / sys / winnt / makefile.src < prev    next >
Encoding:
Makefile  |  1993-04-05  |  12.6 KB  |  404 lines

  1. #       SCCS Id: @(#)Makefile.src       3.1     93/04/02
  2. #       Copyright (c) NetHack PC Development Team 1993
  3. #
  4. #       NT NetHack 3.1 Src Makefile 
  5. #    for MS NMAKE for Windows NT
  6. #  
  7. #    NT Version Tested:  March 1993 SDK pre-release
  8. #
  9. #
  10. #       For questions read the Install.nt file included with
  11. #       the distribution.
  12. #
  13. #    Michael Allison
  14. #
  15. #----------------------------------------------------------------------
  16. # The following nmake include sets up the environment
  17. # correctly for the Windows NT Console I/O subsystem
  18. #
  19. # Do not delete the following include.
  20. #
  21. !include <..\sys\winnt\nhincl.mak>
  22.  
  23. #
  24. #  Set the gamedir according to your preference.  It must be present prior
  25. #  to compilation.
  26.  
  27. GAME    = nethack               # Game Name
  28. GAMEDIR = c:\games\nethack      # Game directory
  29.  
  30.  
  31. #
  32. #  Source directories.    Makedefs hardcodes these, don't change them.
  33. #
  34.  
  35. INCL = ..\include   # NetHack include files
  36. DAT  = ..\dat       # NetHack data files
  37. DOC  = ..\doc       # NetHack documentation files
  38. UTIL = ..\util      # Utility source
  39. SRC  = ..\src       # Main source
  40. SYS  = ..\sys\share # Shared system files
  41. MSYS = ..\sys\winnt # NT Win32 specific files
  42. WIN  = ..\win\tty   # windows files (wintty)
  43. GAMEFILE = $(GAMEDIR)\$(GAME).exe # whole thing
  44.  
  45. RANDOM = ..\sys\share\random.o
  46. #RANDOM = 
  47.  
  48. #
  49. #  Uncomment the next two lines _ONLY_ if you do not want any
  50. #  debug capability in the object files, or in the NetHack executable.
  51. #  Leave them commented if you want debug capability.
  52. #cdebug =
  53. #linkdebug =
  54.  
  55. #
  56. #  To embed the nethack ICON into the .exe file, comment out 
  57. #  the first line and uncomment the second line below.
  58. #  Note that for this to work, you must have sucessfully uudecoded the 
  59. #  file sys\winnt\nhico.uu into sys\winnt\nethack.ico (appr. 766 bytes).
  60. RESFILE = 
  61. #RESFILE = $(GAME).rbj
  62.  
  63.  
  64. ######################################################################
  65. #
  66. #  Nothing below this line should have to be changed.
  67. #
  68. #  Other things that have to be reconfigured are in
  69. #       config.h, pccconf.h and possibly system.h.
  70. #
  71.  
  72. #       This line should not be deleted.
  73.  
  74. NTSUB = -DWIN32CON
  75.  
  76. #
  77. #  The default make target (so just typing 'nmake' is useful).
  78. #
  79. default : $(GAMEFILE)
  80.  
  81. #
  82. #  Make Rules.
  83. #
  84.  
  85. .SUFFIXES:  .exe .o .c .y .l
  86.  
  87. .c.o:
  88.     $(cc) $(cflags) $(NTSUB) -I$(INCL)  $(cvars) $(cdebug) -Fo$*.o $*.c
  89.  
  90.  
  91. #
  92. #  Object files for the game itself.
  93. #
  94.  
  95. VOBJ01 = allmain.o  alloc.o    $(RANDOM)  apply.o    artifact.o  attrib.o
  96. VOBJ02 = ball.o     bones.o    botl.o     cmd.o      dbridge.o
  97. VOBJ03 = decl.o     detect.o   display.o  do.o       do_name.o
  98. VOBJ04 = do_wear.o  dog.o      dogmove.o  dokick.o   dothrow.o
  99. VOBJ05 = drawing.o  dungeon.o  eat.o      end.o      engrave.o
  100. VOBJ06 = exper.o    explode.o  extralev.o files.o    fountain.o
  101. VOBJ07 = hack.o     hacklib.o  invent.o   lock.o
  102. VOBJ08 = mail.o     main.o     makemon.o  mcastu.o   mhitm.o
  103. VOBJ09 = mhitu.o    minion.o   mkmap.o    mklev.o    mkmaze.o
  104. VOBJ10 = mkobj.o    mkroom.o   mon.o      mondata.o  monmove.o
  105. VOBJ11 = monst.o    monstr.o   mplayer.o  mthrowu.o  muse.o
  106. VOBJ12 = music.o    o_init.o   objects.o  objnam.o   options.o
  107. VOBJ13 = pickup.o   pline.o    polyself.o potion.o   quest.o
  108. VOBJ14 = questpgr.o pager.o    pray.o     priest.o   read.o
  109. VOBJ15 = rect.o     restore.o  rip.o      rnd.o      rumors.o
  110. VOBJ16 = save.o     shk.o      shknam.o   sit.o      sounds.o
  111. VOBJ17 = sp_lev.o   spell.o    steal.o    timeout.o
  112. VOBJ18 = topten.o   track.o    trap.o     u_init.o
  113. VOBJ19 = uhitm.o    vault.o    vision.o   vis_tab.o  weapon.o
  114. VOBJ20 = were.o     wield.o    windows.o  wizard.o
  115. VOBJ21 = worm.o     worn.o     write.o    zap.o
  116. WOBJ   = topl.o     getline.o  wintty.o
  117. SOBJ   = winnt.o    sys.o      tty.o      unix.o
  118. VVOBJ  = version.o
  119.  
  120.  
  121. VOBJ   = $(VOBJ01) $(VOBJ02) $(VOBJ03) $(VOBJ04) $(VOBJ05) \
  122.          $(VOBJ06) $(VOBJ07) $(VOBJ08) $(VOBJ09) $(VOBJ10) \
  123.          $(VOBJ11) $(VOBJ12) $(VOBJ13) $(VOBJ14) $(VOBJ15) \
  124.          $(VOBJ16) $(VOBJ17) $(VOBJ18) $(VOBJ19) $(VOBJ20) \
  125.          $(VOBJ21)
  126.  
  127. ALLOBJ = $(VOBJ) $(SOBJ) $(WOBJ) $(VVOBJ)
  128.  
  129. DGN_FILE_H = $(INCL)\align.h    $(INCL)\dgn_file.h
  130. DUNGEON_H  = $(INCL)\align.h    $(INCL)\dungeon.h
  131. EMIN_H     = $(DUNGEON_H)       $(INCL)\emin.h
  132. EPRI_H     = $(DUNGEON_H)       $(INCL)\align.h     $(INCL)\epri.h
  133. ESHK_H     = $(DUNGEON_H)       $(INCL)\eshk.h
  134. MONDATA_H  = $(INCL)\align.h    $(INCL)\mondata.h
  135. MONST_H    = $(INCL)\align.h    $(INCL)\monst.h
  136. PERMONST_H = $(INCL)\monattk.h  $(INCL)\monflag.h   $(INCL)\align.h   \
  137.              $(INCL)\permonst.h
  138. RM_H       = $(INCL)\align.h    $(INCL)\rm.h
  139. SP_LEV_H   = $(INCL)\align.h    $(INCL)\sp_lev.h
  140. VAULT_H    = $(DUNGEON_H)       $(INCL)\vault.h
  141. YOUPROP_H  = $(PERMONST_H)      $(MONDATA_H)        $(INCL)\prop.h    \
  142.              $(INCL)\pm.h       $(INCL)\youprop.h
  143. YOU_H      = $(MONST_H)         $(YOUPROP_H)        $(INCL)\align.h   \
  144.              $(INCL)\attrib.h   $(INCL)\you.h
  145. DISPLAY_H  = $(MONDATA_H)       $(INCL)\vision.h    $(INCL)\display.h
  146. NTCONF_H   = $(INCL)\micro.h    $(INCL)\system.h    $(INCL)\ntconf.h
  147. CONFIG_H   = $(GLOBAL_H)        $(INCL)\tradstdc.h  $(INCL)\config.h
  148. DECL_H     = $(YOU_H)           $(INCL)\spell.h     $(INCL)\color.h   \
  149.              $(INCL)\obj.h      $(INCL)\onames.h    $(INCL)\pm.h      \
  150.              $(INCL)\decl.h
  151. GLOBAL_H   = $(NTCONF_H)        $(INCL)\coord.h     $(INCL)\global.h
  152. HACK_H     = $(CONFIG_H)        $(DUNGEON_H)        $(DECL_H)         \
  153.              $(DISPLAY_H)       $(INCL)\monsym.h    $(INCL)\mkroom.h  \
  154.              $(INCL)\objclass.h $(INCL)\trap.h      $(INCL)\flag.h    \
  155.              $(RM_H)            $(INCL)\vision.h    $(INCL)\wintype.h \
  156.              $(INCL)\engrave.h  $(INCL)\rect.h      $(INCL)\extern.h \
  157.              $(INCL)\trampoli.h $(INCL)\hack.h
  158.  
  159.  
  160.  
  161. #
  162. #  The default target.
  163. #
  164.  
  165. all :     $(GAMEFILE) install.tag
  166.     @echo Done.
  167.  
  168. install: install.tag
  169.  
  170. install.tag:    $(GAMEFILE) $(DAT)\sp_lev.tag
  171.     copy $(DAT)\*.?           $(GAMEDIR)
  172.     copy $(DAT)\*.dat         $(GAMEDIR)
  173.     copy $(DAT)\*.lev         $(GAMEDIR)
  174.     copy $(MSYS)\winnt.cnf    $(GAMEDIR)\NetHack.cnf
  175.     copy $(UTIL)\recover.exe  $(GAMEDIR)
  176.     del   $(GAMEDIR)\makefile
  177.     echo install done > install.tag
  178.  
  179. #
  180. #  The main target.
  181. #
  182. $(GAMEFILE) : $(GAME).lnk $(RESFILE) $(UTIL)\utility.tag
  183.     $(link) $(linkdebug) $(conflags) -out:$*.exe $(RESFILE) @$(GAME).lnk $(conlibs)
  184.  
  185. $(GAME).lnk : $(ALLOBJ)
  186.     @echo $(VOBJ01) > $@
  187.     @echo $(VOBJ02) >> $@
  188.     @echo $(VOBJ03) >> $@
  189.     @echo $(VOBJ04) >> $@
  190.     @echo $(VOBJ05) >> $@
  191.     @echo $(VOBJ06) >> $@
  192.     @echo $(VOBJ07) >> $@
  193.     @echo $(VOBJ08) >> $@
  194.     @echo $(VOBJ09) >> $@
  195.     @echo $(VOBJ10) >> $@
  196.     @echo $(VOBJ11) >> $@
  197.     @echo $(VOBJ12) >> $@
  198.     @echo $(VOBJ13) >> $@
  199.     @echo $(VOBJ14) >> $@
  200.     @echo $(VOBJ15) >> $@
  201.     @echo $(VOBJ16) >> $@
  202.     @echo $(VOBJ17) >> $@
  203.     @echo $(VOBJ18) >> $@
  204.     @echo $(VOBJ19) >> $@
  205.     @echo $(VOBJ20) >> $@
  206.     @echo $(VOBJ21) >> $@
  207.     @echo $(WOBJ) >> $@
  208.     @echo $(SOBJ) >> $@
  209.     @echo $(VVOBJ) >> $@
  210.  
  211. $(GAME).rbj : $(GAME).res
  212.     cvtres -$(CPU) $(GAME).res -o $(GAME).rbj
  213.  
  214. $(GAME).res : $(GAME).rc 
  215.     rc -r $(GAME).rc
  216.  
  217. $(GAME).rc : $(GAME)_.ico
  218.     @echo $(GAME)Icon ICON $(GAME)_.ico >$@
  219.  
  220. $(GAME)_.ico : $(MSYS)\$(GAME).ico
  221.     @copy $(MSYS)\$(GAME).ico $(GAME)_.ico
  222.     
  223. #
  224. #  The following include files depend on makedefs to be created.
  225. #
  226. #  date.h should be remade every time any of the source or include
  227. #  files is modified.
  228. #
  229.  
  230. $(INCL)\date.h : $(VOBJ)
  231.     $(UTIL)\makedefs -v
  232.  
  233. $(INCL)\onames.h :
  234.     $(UTIL)\makedefs -o
  235.  
  236. $(INCL)\pm.h :
  237.     $(UTIL)\makedefs -p
  238.  
  239. main.o:  $(HACK_H) $(SYS)\pcmain.c
  240.     $(cc) $(cflags) $(NTSUB) -I$(INCL)  $(cvars) $(cdebug) -Fo$*.o $(SYS)\pcmain.c
  241.  
  242. tty.o:   $(HACK_H) $(INCL)\wintty.h $(MSYS)\nttty.c
  243.     $(cc) $(cflags) $(NTSUB) -I$(INCL)  $(cvars) $(cdebug) -Fo$*.o $(MSYS)\nttty.c
  244.  
  245. unix.o:  $(SYS)\pcunix.c $(HACK_H)
  246.     $(cc) $(cflags) $(NTSUB) -I$(INCL)  $(cvars) $(cdebug) -Fo$*.o $(SYS)\pcunix.c
  247.  
  248. sys.o : $(SYS)\pcsys.c $(HACK_H)
  249.     $(cc) $(cflags) $(NTSUB) -I$(INCL)  $(cvars) $(cdebug) -Fo$*.o $(SYS)\pcsys.c
  250.  
  251. winnt.o : $(HACK_H) $(MSYS)\winnt.c
  252.     $(cc) $(cflags) $(NTSUB) -I$(INCL)  $(cvars) $(cdebug) -Fo$*.o $(MSYS)\winnt.c
  253.  
  254.  
  255. # some other files in other directories
  256.  
  257. getline.o : $(WIN)\getline.c
  258.     $(cc) $(cflags) $(NTSUB) -I$(INCL)  $(cvars) $(cdebug) -Fo$*.o $(WIN)\$*.c
  259.  
  260. topl.o : $(CONFIG_H) $(WIN)\topl.c
  261.     $(cc) $(cflags) $(NTSUB) -I$(INCL)  $(cvars) $(cdebug) -Fo$*.o $(WIN)\$*.c
  262.  
  263. wintty.o : $(CONFIG_H) $(WIN)\wintty.c
  264.     $(cc) $(cflags) $(NTSUB) -I$(INCL)  $(cvars) $(cdebug) -Fo$*.o $(WIN)\$*.c
  265.  
  266. # March '93 Compiler has bugs.  Routines needing work arounds.
  267.  
  268. attrib.o      : $(HACK_H)
  269.     $(cc) $(cflags) -DWIN32_BUG $(NTSUB) -I$(INCL) $(cvars) $(cdebug) -Fo$*.o $*.c
  270.  
  271. #
  272. #  Housekeeping.
  273. #
  274.  
  275. clean :
  276.     -del *.o
  277.     -if exist *.rc  del *.rc
  278.     -if exist *.ico del *.ico
  279.     -if exist *.res del *.res
  280.     -if exist *.lnk del *.lnk
  281.     -if exist *.rbj del *.rbj
  282.  
  283. spotless : clean
  284.     -del $(INCL)\date.h
  285.     -del $(INCL)\onames.h
  286.     -del $(INCL)\pm.h
  287.     -del $(INCL)\vis_tab.h
  288.     -del vis_tab.c
  289.     -del $(UTIL)\makedefs.exe
  290.     -del $(UTIL)\lev_comp.exe
  291.     -del $(UTIL)\dgn_comp.exe
  292.     -del $(UTIL)\*.lnk
  293.     -del $(UTIL)\*.def
  294.     -del $(UTIL)\*.map
  295.     -del $(DAT)\data
  296.     -del $(DAT)\rumors
  297.     -del $(UTIL)\guideboo.dvi
  298.  
  299. # dependencies
  300. allmain.o     : $(HACK_H)
  301. alloc.o       : $(CONFIG_H)
  302. apply.o       : $(HACK_H)
  303. artifact.o    : $(HACK_H)       $(INCL)\artifact.h
  304. bones.o       : $(HACK_H)
  305. botl.o        : $(HACK_H)
  306. cmd.o         : $(HACK_H)       $(INCL)\func_tab.h
  307. dbridge.o     : $(HACK_H)
  308. decl.o        : $(HACK_H)       $(INCL)\quest.h
  309. detect.o      : $(HACK_H)
  310. display.o     : $(HACK_H)
  311. do.o          : $(HACK_H)       $(INCL)\lev.h
  312. do_name.o     : $(HACK_H)
  313. do_wear.o     : $(HACK_H)
  314. dog.o         : $(HACK_H)       $(INCL)\edog.h
  315. dogmove.o     : $(HACK_H)       $(INCL)\mfndpos.h   $(INCL)\edog.h
  316. dokick.o      : $(HACK_H)       $(ESHK_H)
  317. dothrow.o     : $(HACK_H)
  318. drawing.o     : $(HACK_H)       $(INCL)\termcap.h
  319. dungeon.o     : $(HACK_H)       $(DGN_FILE_H)
  320. eat.o         : $(HACK_H)
  321. end.o         : $(HACK_H)       $(ESHK_H)
  322. engrave.o     : $(HACK_H)       $(INCL)\lev.h
  323. exper.o       : $(HACK_H)
  324. explode.o     : $(HACK_H)
  325. extralev.o    : $(HACK_H)
  326. files.o       : $(HACK_H)
  327. fountain.o    : $(HACK_H)
  328. hack.o        : $(HACK_H)
  329. invent.o      : $(HACK_H)
  330. lock.o        : $(HACK_H)
  331. mail.o        : $(HACK_H)
  332. hacklib.o     : $(HACK_H)
  333. makemon.o     : $(HACK_H)
  334. mcastu.o      : $(HACK_H)
  335. mhitm.o       : $(HACK_H)
  336. mhitu.o       : $(HACK_H)
  337. minion.o      : $(HACK_H)
  338. mklev.o       : $(HACK_H)
  339. mkmap.o       : $(HACK_H)
  340. mkmaze.o      : $(HACK_H)
  341. mkobj.o       : $(HACK_H)
  342. mkroom.o      : $(HACK_H)
  343. mon.o         : $(HACK_H)
  344. mondata.o     : $(HACK_H)
  345. monmove.o     : $(HACK_H)       $(INCL)\mfndpos.h   $(INCL)\artifact.h
  346. monst.o       : $(CONFIG_H)     $(PERMONST_H)       $(INCL)\monsym.h     \
  347.                 $(ESHK_H)       $(VAULT_H)          $(INCL)\color.h      \
  348.                 $(EPRI_H)
  349. monstr.o      : $(CONFIG_H)
  350. mplayer.o     : $(HACK_H)
  351. mthrowu.o     : $(HACK_H)
  352. muse.o        : $(HACK_H)
  353. music.o       : $(HACK_H)
  354. o_init.o      : $(HACK_H)
  355. objects.o     : $(CONFIG_H)     $(INCL)\obj.h       $(INCL)\objclass.h   \
  356.                 $(INCL)\prop.h  $(INCL)\color.h
  357. objnam.o      : $(HACK_H)
  358. options.o     : $(HACK_H)       $(INCL)\termcap.h
  359. pager.o       : $(HACK_H)
  360. pickup.o      : $(HACK_H)
  361. pline.o       : $(HACK_H)     $(EPRI_H)
  362. polyself.o    : $(HACK_H)
  363. potion.o      : $(HACK_H)
  364. priest.o      : $(HACK_H)     $(INCL)\mfndpos.h   $(ESHK_H) \
  365.                 $(EPRI_H)     $(EMIN_H)
  366. quest.o       : $(HACK_H)     $(INCL)\quest.h     $(INCL)\qtext.h
  367. questpgr.o    : $(HACK_H)     $(INCL)\quest.h     $(INCL)\qtext.h
  368. pray.o        : $(HACK_H)
  369. read.o        : $(HACK_H)
  370. rect.o        : $(HACK_H)
  371. restore.o     : $(HACK_H)     $(INCL)\lev.h       $(INCL)\quest.h
  372. rip.o         : $(HACK_H)
  373. rnd.o         : $(HACK_H)
  374. rumors.o      : $(HACK_H)
  375. save.o        : $(HACK_H)     $(INCL)\lev.h       $(INCL)\quest.h
  376. search.o      : $(HACK_H)     $(INCL)\artifact.h
  377. shk.o         : $(HACK_H)
  378. shknam.o      : $(HACK_H)     $(ESHK_H)
  379. sit.o         : $(HACK_H)
  380. sounds.o      : $(HACK_H)     $(INCL)\edog.h      $(ESHK_H)
  381. sp_lev.o      : $(HACK_H)
  382. spell.o       : $(HACK_H)
  383. steal.o       : $(HACK_H)
  384. timeout.o     : $(HACK_H)
  385. topten.o      : $(HACK_H)
  386. track.o       : $(HACK_H)
  387. trap.o        : $(HACK_H)     $(INCL)\edog.h
  388. u_init.o      : $(HACK_H)
  389. uhitm.o       : $(HACK_H)
  390. vault.o       : $(HACK_H)     $(INCL)\vault.h
  391. version.o     : $(HACK_H)     $(INCL)\date.h      $(INCL)\patchlev.h
  392. vision.o      : $(HACK_H)     $(INCL)\vis_tab.h
  393. vis_tab.o     : $(HACK_H)
  394. weapon.o      : $(HACK_H)
  395. were.o        : $(HACK_H)
  396. wield.o       : $(HACK_H)
  397. windows.o     : $(HACK_H)
  398. wintty.o      : $(HACK_H)
  399. wizard.o      : $(HACK_H)
  400. worm.o        : $(HACK_H)     $(INCL)\lev.h
  401. worn.o        : $(HACK_H)
  402. write.o       : $(HACK_H)
  403. zap.o         : $(HACK_H)
  404.